/**
 * 图标文件脚本 - 用于生成简单的TabBar图标
 * 运行此脚本生成基本的PNG图标文件
 */

const fs = require('fs');
const path = require('path');

// 创建目录
const iconDir = path.join(__dirname);
if (!fs.existsSync(iconDir)) {
  fs.mkdirSync(iconDir, { recursive: true });
}

// 基本的Base64编码PNG图标（1px透明图像）
const emptyPngBase64 = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
const pngBuffer = Buffer.from(emptyPngBase64, 'base64');

// 需要创建的图标文件
const iconFiles = [
  'chat.png',
  'chat-active.png',
  'clock.png',
  'clock-active.png',
  'image.png',
  'image-active.png',
  'location.png',
  'location-active.png',
  'note.png',
  'note-active.png'
];

// 创建每个图标文件
iconFiles.forEach(fileName => {
  const filePath = path.join(iconDir, fileName);
  fs.writeFileSync(filePath, pngBuffer);
  console.log(`Created: ${filePath}`);
});

console.log('All icon files created successfully.');
